#include <stdlib.h>

union v{
	char * str;
	int    num;
	
	union  v[];
};

typedef struct list{
	Elem data;
	struct list * next;
}node,nodeptr;

nodeptr new_list(){
	nodeptr head = (nodeptr)malloc(sizeof(node));
	if (!head) ALLOC_FAIL();
	head->next = NULL;
	return head;
}

void destruct_list(nodeptr head, void (*free_elem)(Elem * data)){
	if (!head->next)
		destruct_list(head->next,free_elem);
	(*free_elem)(head->data);
}
